home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Installer SDK Cornucopia 1.0.2 / Script Examples / Action Atoms [inaa] Example / Makefile < prev    next >
Encoding:
Makefile  |  1996-09-10  |  5.4 KB  |  131 lines  |  [TEXT/MPS ]

  1. #
  2. #    makefile for "myActionAtoms.r", the example for action atoms
  3. #
  4. #
  5. #        to build installer script :
  6. #            1) select "Build" from "Build" menu
  7. #            2) type script name "myActionAtoms" ( note: ".r" is omitted )
  8. #            
  9. #        to build debug version of installer script :
  10. #            1) select "Build" from "Build" menu
  11. #            2) type script name "myActionAtoms.debug" ( note: ".r" is omitted )
  12. #            
  13. #
  14.  
  15. scriptName                = myActionAtoms
  16. debugScriptName            = "{scriptName}.debug"
  17.  
  18. # You may change the following paths as you see fit. Currently all paths 
  19. # are set so that scripts will compile when using the original directory
  20. # layout from the Installer SDK.
  21.  
  22. # You may place the ScriptCheck tool in the 'MPW:Tools' directory. Doing this
  23. # removes the need for the {ScriptCheckDir} variable within the makefile.
  24. ScriptCheckDir            = :::Tools:Released:ScriptCheck 4.0.3:
  25.  
  26. # You may place "InstallerTypes.r" file in the 'MPW:Interfaces:RIncludes:' directory. 
  27. # Doing this removes the need for the {InstallerRIncDir} variable or -i specification
  28. # for Rez and compile ( SC ) commands within the makefile.
  29. InstallerRIncDir        = :::DeveloperInterfaces:RIncludes:
  30.  
  31. # You may place the contents of the "DeveloperInterfaces:CIncludes:" folder
  32. # in your 'MPW:Interfaces:CSources' folder. Doing this removes the need for the
  33. # {InstallerCIncDir} variable within the makefile and the -i option in the compile
  34. # command line.
  35. InstallerCIncDir        = :::DeveloperInterfaces:CIncludes:
  36.  
  37. # You may place "Installer Debugger.r" file in the 'MPW:Interfaces:RIncludes:' directory. 
  38. # Doing this removes the need for the {InstallerDebuggerDir} variable within the makefile.
  39. InstallerDebuggerDir    = :::Tools:Released:Installer Debugger 4.0.3:
  40.  
  41. # • action atom stuff
  42.  
  43. # You may use this makefile to compile your own action atoms.
  44. # Just replace the 'ActionAtomFileName<n>' value "myActionAtom_<n>.rsrc",
  45. # the 'AtomSourceName<n>' value "atom<n>.c", and the 'AtomRsrcID_<n>'
  46. # value with the appropriate resource type and ID for your action
  47. # atom code resource. Be sure to specify the action atom resource
  48. # type and ID with the identical values in your source ( .r ) file
  49. # for the installer script.
  50.  
  51. # NOTE: The format2 action atom includes the Installer callback glue routines
  52. # so the section in this makefile that creates the format2 action atom
  53. # is different than the sections that create the format0 and format1
  54. # action atoms.
  55.  
  56. ActionAtomFileName0        = myActionAtom_0.rsrc
  57. AtomSourceName0            = atom0.c
  58. AtomRsrcID_0            = infn=9000
  59.  
  60. ActionAtomFileName1        = myActionAtom_1.rsrc
  61. AtomSourceName1            = atom1.c
  62. AtomRsrcID_1            = infn=9001
  63.  
  64. ActionAtomFileName2        = myActionAtom_2.rsrc
  65. AtomSourceName2            = atom2.c
  66. AtomRsrcID_2            = infn=9002
  67.  
  68. ProgressAtomFileName    = ProgressAtom.rsrc
  69. ProgressAtomSourceName    = ProgressAtom.c
  70. ProgressAtomRsrcID        = infn=9003
  71.  
  72.  
  73.  
  74. "{debugScriptName}" ƒ "{scriptName}"
  75.     Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
  76.     Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
  77.  
  78. "{scriptName}" ƒ "{scriptName}.r" "{ActionAtomFileName0}" "{ActionAtomFileName1}" "{ActionAtomFileName2}" "{ProgressAtomFileName}"
  79.     set theTime    "'`date -d -s` 12:00:00 PM'"
  80.     Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}"
  81.     SetFile -a b -d {theTime} "{scriptName}"
  82.     "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
  83.     SetFile -m {theTime} "{scriptName}"
  84.  
  85. "{ActionAtomFileName0}" ƒ "{AtomSourceName0}"
  86.     SC -r -b "{AtomSourceName0}" -i "{InstallerCIncDir}"
  87.     Link -ra =resPurgeable -rt "{AtomRsrcID_0}" -rn -m ACTIONATOMFORMAT0 -t rsrc -c RSED -sg Main=STDCLIB ∂
  88.         "{AtomSourceName0}.o" ∂
  89.         -o "{ActionAtomFileName0}"
  90.  
  91. "{ActionAtomFileName1}" ƒ "{AtomSourceName1}"
  92.     SC -r -b "{AtomSourceName1}" -i "{InstallerCIncDir}"
  93.     Link -ra =resPurgeable -rt "{AtomRsrcID_1}" -rn -m ACTIONATOMFORMAT1 -t rsrc -c RSED -sg Main=STDCLIB ∂
  94.         "{AtomSourceName1}.o" ∂
  95.         -o "{ActionAtomFileName1}"
  96.  
  97. # this example needs the Installer callback glue with all the installer functions
  98. # in this case specifically to print progress information from within
  99. # the format2 action atom to the Wasabi Installer Debugger
  100. "{ActionAtomFileName2}" ƒ "{AtomSourceName2}" "InstallerCallbackGlue.c.o"
  101.     SC -r -b "{AtomSourceName2}" -i "{InstallerCIncDir}"
  102.     Link -ra =resPurgeable -rt "{AtomRsrcID_2}" -rn -m ActionAtomFormat2 -t rsrc -c RSED -sg Main=STDCLIB ∂
  103.         "{AtomSourceName2}.o" ∂
  104.         "{Libraries}Interface.o" ∂
  105.         "InstallerCallbackGlue.c.o" ∂
  106.         -o "{ActionAtomFileName2}"
  107.  
  108.  
  109.  
  110. # this example needs the Installer callback glue with all the installer functions
  111. # in this case specifically display progress in the installer dialog
  112. # from a format2 action atom
  113. "{ProgressAtomFileName}" ƒ "{ProgressAtomSourceName}" "InstallerCallbackGlue.c.o"
  114.     SC -r -b "{ProgressAtomSourceName}" -i "{InstallerCIncDir}"
  115.     Link -ra =resPurgeable -rt "{ProgressAtomRsrcID}" -rn -m ActionAtomFormat2 -t rsrc -c RSED -sg Main=STDCLIB ∂
  116.         "{ProgressAtomSourceName}.o" ∂
  117.         "{Libraries}Interface.o" ∂
  118.         "InstallerCallbackGlue.c.o" ∂
  119.         -o "{ProgressAtomFileName}"
  120.  
  121.  
  122. # • Installer callback glue stuff ( contains the 'glue' routines for Installer callback routines, etc. )
  123.  
  124. InstallerCSrcDir        = :::DeveloperInterfaces:CSources:
  125.  
  126. # InstallerCallbackGlue.c contains all the cool installer function stuff.
  127. # You can, once compiled link this in to any action atom, search proc,
  128. # action handler, etc.
  129. "InstallerCallbackGlue.c.o" ƒ  "{InstallerCSrcDir}InstallerCallbackGlue.c"
  130.     SC -r -b -i "{InstallerCSrcDir}" -i "{InstallerCIncDir}" "{InstallerCSrcDir}InstallerCallbackGlue.c"
  131.